//
//  MainPageViewController.h
//  PHONGDEP
//
//  Created by kidbaw on 8/1/13.
//  Copyright (c) 2013 kidbaw. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "PaperFoldView.h"
#import <MapKit/MapKit.h>
#import "APIRequester.h"
#import "PersonDataManager.h"
#import "LocationAnnotationView.h"
#import "SBMapView.h"
#import "SBRouteAnnotation.h"
#import "City.h"
#import "UICGRoutes.h"
#import "UICGDirections.h"

typedef enum {
    enumMenuTypeRoom,
    enumMenuTypeHouse,
    enumMenuTypeContact,
    enumMenuTypeSum
}enumMenuType;

#define WIDTH_TABLE_CELL                                        80
#define HEIGHT_TABLE_CELL                                       80

@interface MainPageViewController : UIViewController <MKMapViewDelegate, UITableViewDataSource, UITableViewDelegate, PaperFoldViewDelegate, UIScrollViewDelegate, APIRequesterProtocol, LocationAnnotationViewProtocol, UICGDirectionsDelegate> {
    PaperFoldView                                               *_paperFoldView;
    MKMapView                                                   *_rightMapView;
    UITableView                                                 *_leftTableView, *_centerTableView;
    UIView                                                      *_centerView, *_topView, *_bottomView;
    
    UIButton                                                    *_btnMap_CurrentLocation;
    UIButton                                                    *_btnMap_GetDirections;
    
    float                                                       _marginLeft;
    float                                                       _marginTop;
    float                                                       _marginCell;
    float                                                       _widthCell;
    float                                                       _heightCell;
    float                                                       _pageSize;
    
    NSInteger                                                   _offsetRoom;
    NSInteger                                                   _limitRoom;
    NSInteger                                                   _offsetHouse;
    NSInteger                                                   _limitHouse;
    APIRequester                                                *_APIRequester;
    BOOL                                                        _isRequesting;
    NSInteger                                                   _tableCellIndex;
    NSInteger                                                   _tableCellTotal;
    NSMutableArray                                              *_arrayMain;
    
    BOOL                                                        _isRequestingTheNext;
    BOOL                                                        _isInitiationAtTheFirstTime;
    
    PersonNodeData                                              *_pickedNode;
    
    SBMapView                                                   *_rightDirections_MapView;
    UICGDirections                                              *_rightDirections_Main;
    NSMutableArray                                              *_rightDirections_Array;
    NSString                                                    *_rightDirections_StartPoint;
    NSString                                                    *_rightDirections_EndPoint;
    UICGTravelModes                                             _rightDirections_TravelMode;
}

@end
